﻿$(function () {
    $('#btnSearch').click(function () {
        search();
    });

    $('#btnSearch').click();
});

//加载列表
function initTable(queryData, pageNumber) {
    $("#maingrid").ligerGrid({
        height: '100%',
        url: '/NursingForm/Oxytocin/Search?ram=' + Math.random(),
        parms: queryData,
        page: pageNumber,
        rownumbers: false,
        usePager: false,
        heightDiff: 25,
        fixedCellHeight: false,
        columns: [
        {
            display: '日期', name: 'RiQi', width: 100, render: function (row) {
                return row.RiQi;
            }
        },
        { display: '时间', name: 'ShiJian', width: 80 },
        { display: '胎次', name: 'TaiCi', width: 80 },
        { display: '产次', name: 'ChanCi', width: 80 },
        { display: '诊断', name: 'ZhenDuan', width: 150 },
        { display: '催产素', name: 'CuiChanSu', width: 80 },
        { display: '加催产素', name: 'JiaCuiChanSu', width: 80 },
        { display: '每分钟滴数(ml/h)', name: 'MeiFenZhongDiShu', width: 80 },
        {
            display: '宫缩情况', name: '',
            columns: [
                { display: '强度', name: 'GongSuoQiangDu', width: 100 },
                { display: '持续(秒)', name: 'GongSuoChiXu', width: 100 },
                { display: '间隔(分钟)', name: 'GongSuoJianGe', width: 100 }
            ]
        },
        {
            display: '宫口情况', name: '',
            columns: [
                { display: '位置', name: 'GongKouWeiZhi', width: 100 },
                { display: '质地', name: 'GongKouZhiDi', width: 100 },
                { display: '大小(cm)', name: 'GongKouDaXiao', width: 100 }
            ]
        },
        { display: '先露高低', name: 'XianLuGaoDi', width: 80 },
        { display: '胎膜', name: 'TaiMo', width: 80 },
        { display: '胎心(次/分)', name: 'TaiXin', width: 80 },
        {
            display: '血压(mmHg)', name: '',
            columns: [
                { display: '低', name: 'XueYa_Zuo', width: 80 },
                { display: '高', name: 'XueYa_You', width: 80 }
            ]
        },
        { display: '一般情况(备注)', name: 'BeiZhu', minWidth: 200 },
        { display: '护士签名', name: 'QianMing', width: 100 }
        ]
    });
    GridNoData($("#maingrid"));
}

//搜索
function search(pageNumber) {
    var queryData = {
        patientId: $("#hdnPatientId").val(),
        visitId: $("#hdnVisitId").val()
    };
    initTable(queryData, pageNumber);
}
